home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 65.zip / BS1 part 65 / Math Visin v2.1 disk 1.adf / Arexx.WB / Perspective / ControlPerspective < prev    next >
Text File  |  1992-02-12  |  4KB  |  137 lines

  1. /* ControlWireframe  play around with parameters for wireframe images   6-Feb-90 dh
  2.  
  3.  
  4. ============================================================================ */
  5.  
  6. ADDRESS "MathVision"
  7. OPTIONS RESULTS
  8. OPTIONS FAILAT 1
  9. NUMERIC DIGITS 14
  10.  
  11. SIGNAL ON ERROR
  12.  
  13. Get ZoomX;  ScreenZoomX  = RESULT   /* interrogate MathVision */
  14. Get ZoomY;  ScreenZoomY  = RESULT
  15. Get ScaleX; ObjectScaleX = RESULT
  16. Get ScaleY; ObjectScaleY = RESULT
  17. Get ScaleZ; ObjectScaleZ = RESULT
  18. Get FocalX; DeltaFocalX  = RESULT
  19. Get FocalY; DeltaFocalY  = RESULT
  20. Get FocalZ; DeltaFocalZ  = RESULT
  21. Get ShiftX; XShift       = RESULT
  22. Get ShiftY; YShift       = RESULT
  23. Get Xviewpoint; ViewpointX = RESULT
  24. Get Zviewpoint; ViewpointZ = RESULT
  25. Get BoxMagnification; Magnification = RESULT
  26. Get BoxHeight; AspectRatio = RESULT
  27.  
  28. ClrScr = D2C(12)
  29. StopSign "F"
  30.  
  31. DO WHILE command ~= "X"
  32.   command = MENU()
  33.  
  34.   SELECT
  35.     WHEN command ='A' THEN
  36.       DO
  37.         AspectRatio = GetAns("Aspect Ratio", AspectRatio )
  38.         BoxHeight AspectRatio
  39.       END
  40.     WHEN command ='F' THEN
  41.       DO 
  42.         DeltaFocalX = GetAns("Focal Point Delta X", DeltaFocalX )
  43.         DeltaFocalY = GetAns("Focal Point Delta Y", DeltaFocalY )
  44.         DeltaFocalZ = GetAns("Focal Point Delta Z", DeltaFocalZ )
  45.         FocalX DeltaFocalX
  46.         FocalY DeltaFocalY
  47.         FocalZ DeltaFocalZ
  48.       END
  49.     WHEN command ='G' THEN
  50.       DO
  51.         EditScreenToFront
  52.       END
  53.     WHEN command ='M' THEN
  54.       DO
  55.         Magnification = GetAns("Magnification", Magnification )
  56.         BoxMagnification Magnification
  57.       END
  58.     WHEN command ='O' THEN
  59.       DO 
  60.         ObjectScaleX = GetAns( "Object Scale X", ObjectScaleX )
  61.         ObjectScaleY = GetAns( "Object Scale Y", ObjectScaleY )
  62.         ObjectScaleZ = GetAns( "Object Scale Z", ObjectScaleZ )
  63.         ScaleX ObjectScaleX
  64.         ScaleY ObjectScaleY
  65.         ScaleZ ObjectScaleZ
  66.       END
  67.     WHEN command ='S' THEN
  68.       DO 
  69.         ScreenZoomX = GetAns("Screen Zoom X", ScreenZoomX )
  70.         ScreenZoomY = GetAns("Screen Zoom Y", ScreenZoomY )
  71.         ZoomX ScreenZoomX
  72.         ZoomY ScreenZoomY
  73.       END
  74.     WHEN command ='T' THEN
  75.       DO 
  76.         XShift = GetAns("ShiftX", XShift )
  77.         YShift = GetAns("ShiftY", YShift )
  78.         ShiftX XShift
  79.         ShiftY YShift
  80.       END
  81.     WHEN command ='V' THEN
  82.       DO 
  83.         Get XViewpoint
  84.         ViewpointX = RESULT
  85.         Get ZViewpoint
  86.         ViewpointZ = RESULT
  87.         ViewpointX = GetAns("Viewpoint X", ViewpointX )
  88.         ViewpointZ = GetAns("Viewpoint Z", ViewpointZ )
  89.         XViewpoint ViewpointX
  90.         ZViewpoint ViewpointZ
  91.       END
  92.     OTHERWISE say command;
  93.   END /*select*/
  94. END
  95.  
  96. EXIT
  97.  
  98. /*================================== MENU ================================= */
  99.  
  100. MENU:
  101.   SAY ClrScr
  102.   SAY "A - Aspect Ratio   ("AspectRatio")"
  103.   SAY "M - Magnification  ("Magnification")"
  104.   SAY "O - Object Scaling ("ObjectScaleX","ObjectScaleY","ObjectScaleZ")"
  105.   SAY "S - Screen Zoom    ("ScreenZoomX","ScreenZoomY")"
  106.   SAY "F - Focal Point    ("DeltaFocalX","DeltaFocalY","DeltaFocalZ")"
  107.   SAY "V - Viewpoint      ("ViewpointX","ViewpointZ")"
  108.   SAY "T - Translation    ("XShift","YShift")"
  109.   SAY "G - Goto Edit Screen"
  110.   SAY "X - Exit"
  111.  
  112.   OPTIONS PROMPT "--------------> "
  113.   PULL Command
  114.  
  115.   RETURN command
  116.  
  117. /* --------------------------------- GetAns -------------------------------- */
  118. /* result = GetAns( prompt, default) */
  119. /* prompt for input, displaying default. Accept one item. If only <return> */
  120. /* was pressed, return the default answer */
  121.  
  122. GetAns:
  123.   parse arg prompter, default
  124.   Options Prompt Prompter "(" Default "): "
  125.   pull response
  126.   if (response = "") THEN response = default
  127.   return(response)
  128.  
  129. /*-------------------------------- ERROR -------------------------------- */
  130.  
  131. ERROR:         /* Error Diagnostic for return codes */
  132.   Get Diagnosis RC
  133.   SAY RESULT" on line "SIGL
  134.   DO i = 1 to 5000
  135.   END
  136.   EXIT
  137.